package cn.tedu.autoshow.website.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Accessors(chain = true)
public class PaperUpdateInfoParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "稿件标题不能为空，上传失败")
    @ApiModelProperty(value = "显示稿件标题", example = "请添加稿件标题")
    private String title;

    @NotNull(message = "稿件描述不能为空，上传失败")
    @ApiModelProperty(value = "稿件描述", example = "请添加稿件描述")
    private String description;

    @NotNull(message = "添加稿件失败，必须提交稿件类别！")
    @ApiModelProperty(value = "稿件类别", required = true, example = "请选择稿件类别")
    private String paperCategoryId;

    @ApiModelProperty(value = "稿件关键词", example = "请添加稿件的关键词")
    private String keywords;

    @Range(max = 99, message = "排序序号值不合法，合法范围0~99")
    @ApiModelProperty(value = "排序序号，范围0~255", example = "99")
    private Integer sort;

    @NotNull(message = "是否显示不能为空")
    @Range(max = 1, message = "是否显示值不合法")
    @ApiModelProperty(value = "是否显示（1=显示，0=不显示）", required = true, example = "1")
    private Integer isDisplay;
}










